﻿@model IEnumerable<GAE_PI.View_Participants>
@if (Model.Count() == 0)
{
    <text>Il n'y a aucun participant pour cette activité</text>
}
else
{
    <table id="gridParticipants">
        <thead>
            <tr>
                <th>
                </th>
                <th>
                    Nom
                </th>
                <th>
                    Prenom
                </th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td>
                        @Html.ActionLink("Detail", "ActiviteEleve", "ActiviteEleve", new { username = item.username }, new { @class = "link" })
                    </td>
                    <td>
                        @item.nom
                    </td>
                    <td>
                        @item.prenom
                    </td>
                </tr>
            }
        </tbody>
    </table>
}
<script type="text/javascript">
    $(document).ready(function () {
        $("#gridParticipants").wijgrid({ allowSorting: true, allowPaging: true, pageSize: 20 });
    });
</script>
